package com.example.myproject.web;

import com.example.myproject.domain.User;
import com.example.myproject.mapper.UserMapper;
import com.example.myproject.util.JsonUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.*;
/**
 *
 * 我们通过@ApiOperation注解来给API增加说明、通过@ApiImplicitParams、@ApiImplicitParam注解来给参数增加说明。
 *
 * ApiModel,ApiModelproperyt 属性和类
 *
 */
@RestController
@Api(tags = "ShardingController", description = "ShardingController")
@RequestMapping(value="/ShardingController")     // 通过这里配置使下面的映射都在/users下，可去除
public class ShardingController {

    @Autowired
    private CompanyFreezeRecordMapper companyFreezeRecordMapper;

    @ApiOperation(value="selectList", notes="selectList")
    @RequestMapping(value={"/selectCompanyFreezeRecord"}, method= RequestMethod.GET)
    public Object selectCompanyFreezeRecord() {
        Object object  = companyFreezeRecordMapper.selectById(1L);
        JsonUtil.toJson("object=="+JsonUtil.toJson(object));
        return object;
    }



}

